-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Enable auto logged in components on landing page #1754
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
site/docs/components/AppDemo.tsx
Outdated
const queryClient = new QueryClient(); | ||
|
||
const demoWalletConnector = () => () => { | ||
const demoWalletPK = import.meta.env.VITE_DEMO_WALLET_PK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This demo wallet will never have a value associated with it therefore I believe it's fine to leak the PK in the client.
21db9bb
to
44675e1
Compare
@@ -61,10 +59,9 @@ function WalletDemo() { | |||
Wallet | |||
</WalletDropdownLink> | |||
<WalletDropdownBasename /> | |||
<WalletDropdownDisconnect /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that we are removing disconnect option, consider adding a warning like, "wallet address for demonstration purposes only. do not send funds to this address"
What changed? Why?
Create new demo app provider which includes our auto logged in demo wallet. This is to achieve a "logged in" state for our components on the landing page, allowing users to see the intended components rather than a bunch of Connect Wallet buttons.
For now, we are only auto logging in for the Wallet and Swap component. The Fund and Transaction component would have to be set to disabled. We've decided that it's better to leave these and allow the user to connect their own wallet to test out the functionality.
Notes to reviewers
How has it been tested?